package product.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import product.domain.Attr;
import product.domain.AttrGroup;
import com.baomidou.mybatisplus.extension.service.IService;
import product.domain.Brand;
import product.vo.AttrGroupWithAttrsVo;
import product.vo.AttrRelationVo;

import java.util.List;
import java.util.Map;

/**
 * @author panghu
 * @description 针对表【pms_attr_group(属性分组)】的数据库操作Service
 * @createDate 2023-03-04 21:03:08
 */
public interface AttrGroupService extends CommonService<AttrGroup> {

    /**
     * 分页查询数据
     *
     * @param params
     * @return
     */
    Page<AttrGroup> queryPage(Map<String, Object> params, Long catId);

    AttrGroup getAttrGroupById(Long attrGroupId);

    /**
     * 查询属性分组关联的基础属性列表
     *
     * @param attrGroupId
     * @return
     */
    List<Attr> getAttrRelation(Long attrGroupId);

    /**
     * 移除属性分组关联的基础属性
     *
     * @param attrRelationVo
     * @return
     */
    boolean removeAttrRelation(AttrRelationVo[] attrRelationVo);

    /**
     * 获取分类下所有分组和关联的属性
     *
     * @param catId
     * @return
     */
    List<AttrGroupWithAttrsVo> getAttrGroupWithAttrsByCatId(Long catId);
}
